/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hva.web.mvcwebapp.models;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Thijs
 */
@Entity
@Table(name = "uploadassignment")
public class UploadAssignment implements Serializable {
    
    @Id
    @GeneratedValue
    @Column(name = "uploadassignmentid")
    private int uploadassignmentid;
    @Column(name = "uploadassignmentname")
    private String uploadassignmentname;
    @Column(name = "uploadassignmentdescription", length=10000)
    private String uploadassignmentdescription;
    @ManyToOne
    private Chapter chapter;
    @OneToMany
        private Set<UploadedAssignments> uploadedassignments = new HashSet<UploadedAssignments>() {
    };
    

    public UploadAssignment() {
    }

    /**
     * @return the uploadassignmentid
     */
    public int getUploadassignmentid() {
        return uploadassignmentid;
    }

    /**
     * @param uploadassignmentid the uploadassignmentid to set
     */
    public void setUploadassignmentid(int uploadassignmentid) {
        this.uploadassignmentid = uploadassignmentid;
    }

    /**
     * @return the uploadassignmentname
     */
    public String getUploadassignmentname() {
        return uploadassignmentname;
    }

    /**
     * @param uploadassignmentname the uploadassignmentname to set
     */
    public void setUploadassignmentname(String uploadassignmentname) {
        this.uploadassignmentname = uploadassignmentname;
    }

    /**
     * @return the uploadassignmentdescription
     */
    public String getUploadassignmentdescription() {
        return uploadassignmentdescription;
    }

    /**
     * @param uploadassignmentdescription the uploadassignmentdescription to set
     */
    public void setUploadassignmentdescription(String uploadassignmentdescription) {
        this.uploadassignmentdescription = uploadassignmentdescription;
    }

    /**
     * @return the chapter
     */
    public Chapter getChapter() {
        return chapter;
    }

    /**
     * @param chapter the chapter to set
     */
    public void setChapter(Chapter chapter) {
        this.chapter = chapter;
    }

    /**
     * @return the uploadedassignments
     */
    public Set<UploadedAssignments> getUploadedassignments() {
        return uploadedassignments;
    }

    /**
     * @param uploadedassignments the uploadedassignments to set
     */
    public void setUploadedassignments(Set<UploadedAssignments> uploadedassignments) {
        this.uploadedassignments = uploadedassignments;
    }

   
}
